package com.todo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.todo.dao.ITaskDao;
import com.todo.model.Task;

@Service
public class TaskService implements ITaskService {

    @Autowired
    private ITaskDao taskDao;
    
    public void addTask(Task task) {
        taskDao.addTask(task);
    }

    public List<Task> listTask() {
        return taskDao.listTask();
    }

    public void updateTask(Task task) {
        taskDao.updateTask(task);
    }

    public void removeTask(int id) {
        taskDao.removeTask(id);
    }

}
